package org.jeecg.modules.platform.organization.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.common.system.api.entity.SysPermission;
import org.jeecg.modules.platform.entity.CyPlatformOrganizationPermission;

import java.util.List;

/**
 * @Description: 组织权限
 * @Author: jeecg-boot
 * @Date:   2024-10-28
 * @Version: V1.0
 */
public interface ICyPlatformOrganizationPermissionService extends IService<CyPlatformOrganizationPermission> {

    /**
     * 批量保存
     * @param organizationId
     * @param selectModules
     */
    void saveBatch(String organizationId, List<CyPlatformOrganizationPermission> selectModules);

    /**
     * 批量更新
     * @param organizationId
     * @param selectModules
     */
    void update(String organizationId,String approveUser, List<CyPlatformOrganizationPermission> selectModules);

    /**
     * 查询当前有权限的模块[未过期的]
     * @param orgId
     * @return
     */
    List<String> listModulesByOrg(String orgId);

    /**
     * 获取组织拥有的模块的全部权限
     * @param orgId
     * @return
     */
    List<SysPermission> listOrgPermission(String orgId);

    /**
     * 注册权限
     * @param id
     */
    void registerPermission(String id);
}
